﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Sharpmark.MarkTweet.Services.Twitter;

namespace Sharpmark.MarkTweet.View.Controls
{
    /// <summary>
    /// Interaction logic for UserBaseInfo.xaml
    /// </summary>
    public partial class UserBaseInfo : UserControl
    {
        public User User { get; set; }

        public UserBaseInfo()
        {
            InitializeComponent();
        }

        public UserBaseInfo(User user)
            : this()
        {
            txtName.Text = String.Format("{0} | {1}", user.Name, user.ScreenName);
            if (user.Status != null)
            {
                txtLastStatus.Text = user.Status.Text;
            }
            imgUserLogo.Source = new BitmapImage(new Uri(user.ProfileImageUrl));
        }
    }
}
